package com.iraeta.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.util.Date;

/**
 * 文件上传对象 sys_files
 * 
 * @author iraeta
 * @date 2023-11-04
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@NoArgsConstructor
@TableName("sys_files")
public class SysFiles
{
    private static final long serialVersionUID = 1L;

    public SysFiles(Integer entityTypeId, Long entityId) {
        this.entityTypeId = entityTypeId;
        this.entityId = entityId;
    }
    public SysFiles(Integer entityTypeId, Long entityId, String fileName, String filePath) {
        this.entityTypeId = entityTypeId;
        this.entityId = entityId;
        this.fileName = fileName;
        this.filePath = filePath;
    }

    /** 文件ID */
    @TableId(value = "f_id", type = IdType.AUTO)
    private Long fId;

    /** 业务类型 */
    @TableField(value = "entityTypeId")
    private Integer entityTypeId;

    /** 业务类型Id */
    @TableField(value = "entityId")
    private Long entityId;

    /** 文件名称 */
    @TableField(value = "fileName")
    private String fileName;

    /** 文件路径 */
    @TableField(value = "filePath")
    private String filePath;

    /** 创建者 */
    @TableField(value = "create_by")
    private String createBy;

    /** 创建时间 */
    @TableField(value = "create_time")
    private Date createTime;

    /** 更新者 */
    @TableField(value = "update_by")
    private String updateBy;

    /** 更新时间 */
    @TableField(value = "update_time")
    private Date updateTime;
}
